<template>
  <div>
    <el-col :span="6">
      <el-form-item :label="title">
        <el-date-picker
          v-model="DateTime"
          style="width: 70%"
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          @change="getDateTimeRange"
        >
        </el-date-picker>
      </el-form-item>
    </el-col>
  </div>
</template>

<script>
export default {
  data() {
    return {
      DateTime: "",
    };
  },
  props: {
    title: {
      type: String,
      default: "",
    },
  },
  methods: {
    getDateTimeRange() {
      console.log(this.DateTime);
    },
  },
};
</script>
<style lang="scss" scoped>
.el-form-item {
  width: 371px;
  ::v-deep .el-form-item__label {
    width: 96px;
  }
}
</style>
